/**
 * Copyright (c) 2011-11-12 WKM and/or its affiliates. 
 * Use is subject to license terms.
 * All rights reserved.
 */
package org.wkm.frame.listener;

import java.awt.event.WindowEvent;

import javax.swing.JFrame;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author WKM
 * Modification history
 * 1.WKM - 2011-11-12 -Create File
 */
public class DefaultWindowListener extends WindowListenerAdapter {

	private static Logger logger = LoggerFactory.getLogger(DefaultWindowListener.class);
	
	public void windowClosing(WindowEvent e) {
		// TODO Auto-generated method stub
		
		if(e.getSource() == null){
			logger.info("WindowEvent==null");
			return;
		}
		
		logger.info(e.getSource().toString());
		
		if(e.getSource() instanceof JFrame){
			JFrame frame = (JFrame)e.getSource();
			frame.setVisible(false);
//			frame.dispose();
		}
		
	}
}
